from Base import message, intersect, SS_VALID
from DRG import MDCR_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["92.2100","92.2200","92.2201","92.2300","92.2301","92.2302","92.2303","92.2400","92.2400x002","92.2400x003","92.2400x004","92.2400x005","92.2400x006","92.2400x007","92.2500","92.2501","92.2600x001","92.2601","92.2602","92.3000","92.3001","92.3002","92.3100","92.3101","92.3102","92.3200","92.3200x001","92.3201","92.3202","92.3900","92.4100"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合RL1入组条件，匹配规则：主手术匹配')

    if MDCR_DRG.RL11_group(record):
      return 'RL11'

    if MDCR_DRG.RL15_group(record):
      return 'RL15'
        
    return 'RL1'
  else:
    return ''
    
